import React, {Component} from 'react';
import RaisedButton from 'material-ui/RaisedButton';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
const {shell} = require('electron');

class ReactComponent extends Component {

    constructor(props, context) {
        super(props, context);
    }

    onButtonClick = function () {
        console.log("onButtonClick");
        shell.openItem("/home");
    };

    render() {
        return (
            <MuiThemeProvider muiTheme={getMuiTheme()}>
                <div>
                    <RaisedButton label="Button" onTouchTap={this.onButtonClick}/>
                </div>
            </MuiThemeProvider>
        );
    }
}

export default ReactComponent;